<template>
<div style="position: relative;height: 100%;background: #F5F5F5;">
	<div class="lu_kuang">
		<router-link to="/wdpq">
		<div class="lu_kuangw">拼抢中</div>
		</router-link>
	</div>
  <div class="dizhi">
  	<!-- <div class="dz_tp"> -->
		<img src="static/address.png" class="addre">
  	<!-- </div> -->
  	<div class="qr_xx" >
  		<div class="dz_name">
  			<div class="shr">{{order.username}}</div>
  			<div class="sh_dh">{{order.phone}}</div>
  			<div class="clearfix"></div>
  			<span class="sh_dz">{{order.user_address}}</span>
  			
  		</div>
  	</div>
  	<!-- <div class="yjt"><img src="../assets/img/arrow_right_gray.png"></div> -->
  	<div class="clearfix"></div>
  	<div class="dz_line">
	  	<img src="static/huawen.jpg"/>
	</div>
  </div>
  <div style="width: 100%; height: 10px;background-color: #eee;"></div>
  <div class="ji_fenk1">
			  	<ul>
			  		<li class="tu2_tu22"></li>
			  		<li class="jifenshangcheng">积分商城</li>
			  		
			  		<div class="clearfix"></div>
			  	</ul>
			  	
	  		</div>
	  	<div class="tu1_box1">
	  		<div class="tu1_tu11">
		  		<div class="tupian1">
					<img :src=url+order.image>
		  		</div>
		  		<div class="wenzi">
				  		<p style="font-size: 13px;color: #4a4a4a;line-height: 16px;">{{order.goods_name}}</p>
				  		<p style="font-size: 12px;color: #9b9b9b;line-height: 12px;margin-top: 5px;">{{order.attr_name}}</p>
				  		<p style="line-height: 13px;font-size: 14px;color: #ff2e22;margin-top: 9px;float: left;">¥{{order.price}}/次
				  		</p>
				  		<p class="j_sj">距结束 {{day}}天{{hours}}：{{minutes}}：{{miao}}</p>
			  		</div>
			  		<div class="clearfix"></div>
	  		</div>
	  	</div>
	  	<div style="width: 100%;height: 8px;background: #F5F5F5;"></div>
	  	<div class="di_san">
	  		<span class="di_sanm">第{{mingci}}名</span>
	  		<span class="di_sanmm">再获得29次助力可上升排名</span>
	  	</div>
	  	<div class="di_san1">
	  		<div class="liuliu">
	  			{{log_count}}位好友帮助了您
	  		</div>
	  	</div>
	  	<div class="meiren" v-for="value in log">
	  		<img :src=value.headimg />
	  		{{value.nickname}}
	  		<span class="meiren2">{{value.created_at | datetime}}</span>
	  	</div>
	  	
	  	<!--<div style="height: 56px;width: 100%;background: #F5F5F5;padding: 12px 10px;">
	  		<div style="font-size: 12px;color: #7F7F7F;">支付1元将生成您的援助页面，邀请好友助力，每个好友可进行1次助力，助力金额为1元，帮助您的好友将同时获得10点积分。</div>
	  	</div>
	  	<div style="height: 40px;width: 100%;padding: 12px 10px;background: white;">
	  		<div style="font-size: 14px;color: #4A4A4A;">请填写您的邀请（35字以内）</div>
	  	</div>
	  	<div style="height: 100px;width: 100%;padding: 12px 10px;background: white;">
	  		<div style="width: 355px;height:75px;margin: 0 auto;background: #F5F5F5;padding: 12px 10px;">
	  			<div style="font-size: 13px;color: #9B9B9B;">好兄弟，帮帮忙，就差你了！</div>
	  		</div>
	  	</div>
	  	<div style="width: 100%;height: 144px;background: #F5F5F5;"></div>-->
	  	<!--<div class="yu_fei">
	  		<span class="yun_fei">运费</span>
	  		<span class="ji_fen">150积分</span>
	  	</div>
	  	<div class="yu_fei">
	  		<span class="sanqi">370积分</span>
	  		
	  		<span class="gongyi">共1件商品 小计：</span>
	  	</div>
	 <div style="width: 100%; height: 10px;background-color: #eee;"></div> 
	 <div class="ji_fenk1">
			  	<ul>
			  		<li class="tu2_tu22"></li>
			  		<li class="jifenshangcheng">积分商城</li>
			  		
			  		<div class="clearfix"></div>
			  	</ul>
			  	
	  		</div>
	  	<div class="tu1_box1">
	  		<div class="tu1_tu11">
		  		<div class="tupian1"></div>
		  		<ul class="wenzi">
			  		<li style="font-size: 13px;color: #4a4a4a;line-height: 16px;">高露洁（Colgate）360度备长炭洁颜膏 全面口腔健康 180g</li>
			  		<li style="font-size: 12px;color: #9b9b9b;line-height: 12px;margin-top: 5px;">备长炭180g</li>
			  		<li style="line-height: 13px;font-size: 14px;color: #4A4A4A;margin-top: 9px;float: left;">220积分
			  		
			  		</li>
			  		<li class="cheng_1">x1</li>
		  		</ul>
		  		<p class="clearfix"></p>
	  		</div>
	  	</div>-->
	  	<!--<div class="yu_fei">
	  		<span class="yun_fei">运费</span>
	  		<span class="ji_fen">150积分</span>
	  	</div>
	  	<div class="yu_fei">
	  		<span class="sanqi">370积分</span>
	  		
	  		<span class="gongyi">共1件商品 小计：</span>
	  	</div>-->
  <!--<div class="zgydgfqjd">
  	<span class="zg_wenzi">中国移动官方旗舰店</span>
  </div>-->
  <!--<div class="spxq_spnr">
  	<div class="sp_xtp">
  		<!--<img src="../assets/spxtp.jpg"/>-->
  	<!--</div>
  	<div class="spnr_wenzi">
  		<div class="spnr_text">
  			广东 移动手机话费充值50元快充直充24小时中国移动官方旗舰店
  		</div>
  		<div class="sp_jt_jg">
  			<span class="jine">￥49.80</span>
  			<span class="shuliang">x1</span>
  			<div class="clearfix"></div>
  		</div>
  	</div>
  	<div class="clearfix"></div>
  </div>-->
  <!--<div id="gmsl">
  	<x-number :title="('购买数量')" :value="0" :min="0" @on-change="change"></x-number>
  </div>
   
   <div class="cz_number">
	   	<div class="chongzhihaoma">充值号码:</div>
	   	<input class="shuru" type="text" placeholder="仅限中国大陆手机号码" name="" id="" value="" />
	   	<div class="clearfix"></div>
   </div>
   <div class="sp_xj">
   		<span class="xj_jine">￥49.80</span>
   		<span class="spxj">共一件商品  小计：</span>
   		<div class="clearfix"></div>
   </div>-->
   <!--<div class="tjdd_footer">
   	<div class="heji_zuo">
   		<span class="shishi">实付款：</span>
   		<span class="y_i">￥1.00</span>
   		<div class="clearfix"></div>
   	</div>-->
   	<!--<router-link to="/zffs">-->
   	<!--<div class="tjdd_btn">
   		<input type="button" name="" id="" value="立即发起" @click="enjoying" />
   	</div>-->
   	<!--</router-link>-->
   <!--</div>
   <div @click="xiaoshi"  v-show="enjoy" style="position: absolute;top: 0;left: 0; width: 100%; height: 100%;background-color: rgba(0,0,0,0);"></div>
   	<div v-show="enjoy" class="tuan_kuang">
		<div class="fu_hao">
			<img src="../assets/img/successful_large.png">
		</div>	
		<div class="man_jifen">满599积分 邮费已减免</div>
	</div>-->
</div>
</template>

<script>
	//import { Group, Cell } from 'vux'
	import { mapState, mapActions } from 'vuex'
	import axios from 'axios'
	export default {
		components: {
//			Group,
//			Cell,
			mapState,
		    mapActions,
		},
		data() {
			return {
				enjoy:false,
				order:'',
				day:'',
				hours:'',
				minutes:'',
				miao:'',
				log_count:'',
				log:[],
				mingci:'',
			}
		},
		methods: {
			enjoying(){
				this.enjoy = true;
			},
			xiaoshi(){
				this.enjoy = false;
			},
			dateDif(begin,end){
			    var date = begin - end; 
			    var days    = date / 1000 / 60 / 60 / 24;
			    var daysRound   = Math.floor(days);
			    var hours    = date/ 1000 / 60 / 60 - (24 * daysRound);
			    var hoursRound   = Math.floor(hours);
			    var minutes   = date / 1000 /60 - (24 * 60 * daysRound) - (60 * hoursRound);
			    var minutesRound  = Math.floor(minutes);
			    var seconds   = date/ 1000 - (24 * 60 * 60 * daysRound) - (60 * 60 * hoursRound) - (60 * minutesRound);
			    var secondsRound  = Math.floor(seconds);
			    var time = "倒计时"+(daysRound+"天"+hoursRound +"时"+minutesRound+"分"+secondsRound+"秒");
			    this.day = daysRound;
			    this.hours = hoursRound;
			    this.minutes = minutesRound;
			    this.miao = secondsRound;
			    setInterval(()=>{this.dajishi()},1000)
		    },
		    dajishi(){
		    	if(this.day == 0 && this.hours == 0 && this.minutes == 0 && this.miao == 0){
		    		this.day = 0;
		    		this.hours = 0;
		    		this.minutes = 0;
		    		this.miao = 0;
		    	}else{
			    	if(this.miao > 0){
			    		this.miao--;
			    	}else{
			    		this.miao = 59;
			    		if(this.minutes > 0){
			    			this.minutes--;
			    		}else{
			    			this.minutes = 59;
			    			if(this.hours > 0){
			    				this.hours--;
			    			}else{
			    				this.hours = 23;
			    				if(this.day >0){
			    					this.day--;
			    				}
			    			}
			    		}
			    		
			    	}
			    }
	    	},
		},
		created(){
			var order_id = this.$route.query.order_id;
			axios.post(this.url + '/home/RobOrder/orderSituation',{openid:this.token,order_id:order_id}).then((res)=>{
				console.log(res);
				this.order = res.data.order;
				this.log_count = res.data.log_count;
				this.log = res.data.log;
				this.mingci = res.data.dijiming;
				this.dateDif(res.data.order.start_time*1000,res.data.order.end_time*1000);
			})
		},
		computed:{
            ...mapState({
                token: state => state.Token.userToken()//获取用户Token
            })
        }
	}
</script>

<style scoped>
	
	*{
		/*box-sizing: border-box;*/
	}
	body{
		position: relative;
	}
	.weui-cell{
		padding: 0px 15px;
	}
	input{
		margin: 0;
		padding: 0;
		display: block;
		outline: none;
	}
	.tjdd_footer{
		width: 100%;
		height: 50px;
		position: fixed;
		bottom: 0;
		background: #FFFFFF;
		/*border: 1px solid red;
		box-sizing: border-box;*/
	}
	.heji_jine{
		float: right;
		height: 50px;
		line-height: 50px;
		font-family: "微软雅黑";
		color: #DF3033;
		font-size: 14px;
		padding-right: 3px;
		font-size: 14px;
		background-color: #FFFFFF;
	}
	.heji_text{
		float: right;
		height: 50px;
		line-height: 50px;
		color: #333333;
		background-color: #FFFFFF;
		font-size: 14px;
		
		
	}
	.tjdd_btn{
		width: 30%;
		float: right;
		/*border: 1px solid black;
		box-sizing: border-box;*/
		height: 50px;
		background-color: black;
	}
	.tjdd_btn input{
		width: 100%;
		line-height: 50px;
		background-color: #00C850;
		color: #fff;
		font-size: 16px;
		outline: none;
		border:none ;
	}
	.heji_zuo{
		width: 70%;
		height: 50px;
		float: left;
		background-color: #FFFFFF;
		/*border: 1px solid blue;
		box-sizing: border-box;*/
	}
	.sp_xj{
		margin-right: 16px;
	}
	.spxj{
		float:right;
		color: #333333;
		font-size: 15px;
	}
	.xj_jine{
		float: right;
		color: #DF3033;
		font-size: 15px;
		font-family: "微软雅黑";
	}
	.weui-cells {
    background-color: #FFFFFF;
    line-height: 1.41176471;
    font-size: 14px;
    overflow: hidden;
    position: relative;
}
	.clearfix{
		clear: both;
	}
	.cz_number{
		border-bottom: 1px solid #E5E5E5;
		width: 92%;
		margin: 0 auto;
	}
	.chongzhihaoma{
		width: 20%;
		margin: 14px 0;
		font-size: 16px;
		float: left;
	}
	.shuru{
		padding: 0 5px;
		height: 25px;
		width: calc(80% - 10px);
		font-size: 16px;
		margin: 14px 0;
		float: left;
	}
	.dizhi{
		width: 100%;
		margin: 0 auto;
		padding: 0 15px;
		position: relative;
		/*height: 78px;*/
	}
	.addre{
		position: absolute;
		top:50%;
		margin-top:-11px;
	}
	/*.dz_tp{
		display: inline-block;
		vertical-align: middle;
		float: left;
		width: 10%;
		margin-top: 0px;
		
	}*/
	.dizhi .addre{
		vertical-align: middle;
		display: inline-block;
		float:left;
		/*margin-top: 25px;*/

	}
	img,input{
		display: block;
	}
	
	.qr_xx{
		width: 80%;
		float: left;
		margin-top: 20px;
		margin-left: 30px;
		
	}
	.shr{
		color: #333333;
		font-size: 14px;
		float: left;
		margin-top: -10px;
		line-height: 14px;
	}
	.sh_dz{
		color: #9B9B9B;
		font-size: 13px;
		line-height: 17px;
		/*margin-top: -20px;*/
		
	}
	.sh_dh{
		float: left;
		margin-left: 10px;
		color: #333333;
		font-size: 14px;
		line-height: 14px;
		margin-top: -10px;
		
	}
	.yjt{
		
		height: 78px;
		float: right;
		/*background: url(../assets/yjt.png) no-repeat center;*/
		background-size: 7px;
		
		
	}
	.yjt img{
		display: block;
		height: 20px;
		width:20px;
		margin-top: 30px;
		
		
	}
	.dz_line{
		width: 100%;
		height: 2px;
	}
	.dz_line img{
		display: block;
		height: 2px;
		width: 100%;
		/*margin-top: -20px;*/
	}
	.zgydgfqjd{
		width: 100%;
		font-size: 12px;
		color: #333333;
		margin: 10px 0;
	}
	.zg_wenzi{
		margin: 11px 0px 10px 16px;
	}
	.spxq_spnr{
		width: 100%;
		height: 78px;
		padding: 15px 0;
		/*border: 1px solid red;*/
		background-color: #fafafa;
		
	}
	.sp_xtp{
		width: 78px;
		height: 78px;
		/*border: 1px red solid;*/
		margin-left: 15px;
		float: left;
	}
	.sp_xtp img{
		width: 100%;
		display: block;
	}
	.spnr_wenzi{
		height: 78px;
		float: right;
		background-color: #FAFAFA;
		box-sizing: border-box;
		/*border: 1px solid black;*/
		position: relative;
		width: calc(100% - 108px);
		padding-right: 27px;
	}
	.spnr_text{
		font-size: 14px;
		color: #333333;
		background-color: #FAFAFA;
	}
	.sp_jt_jg{
		font-size: 16px;
		color: #DF3033;
		background-color: #FAFAFA;
	}
	.jine{
		float: left;
		font-family: "微软雅黑"
	}
	.shuliang{
		float: right;
		color: #333333;
		font-size: 12px;
		position: absolute;
		bottom: 0;
		right: 27px;
	}
	input::-webkit-input-placeholder{
		color: #949494;
		font-size: 16px;
	}
	.content1{
		width: 100%;
		border: 1px /*solid*/ red;
		color: white;
		/*border: 1px solid red;*/
	}
	
.zl{
		width: 100%;
		text-align: center;
		line-height: 20px;
		font-size: 16px;
		margin-top: 15px;
		color: #333;
	}
.gzjf{width: 100%;
		text-align: center;
		line-height: 17px;
		font-size: 13px;
		color: #7f7f7f;
		margin-top: 10px;
		padding: 0 15px;
		
	}
.lan{
		width: 100%;
		border: 1px /*solid*/ green;
		margin-top: 20px;
	}
.yq{margin: 0 auto;
		width: 100%;
		height: 44px;
		background-color: #00c850;
		color: #FFFFFF;
		line-height: 22px;
	}
.lan1{
		float: left;
		width: 100%;
		border: 1px /*solid */green;
		
		line-height: 13px;
		font-size: 13px;
		color: #333;
		margin-left: 301px;
		margin-bottom: 20px;
	}
.yq1{
		padding: 0 20px;
		width: 100%;
		height: 44px;
		background-color: white;
		color: #00C850;
		line-height: 22px;
	}
	
*{list-style: none;margin: 0;padding: 0;}
.pq li{color: #333;
	       float: left;
	       line-height: 20px;
	       font-size: 14px;
	       margin-top: 10PX;
}
.pq .tu{height: 24px;
		width: 24px;
		border-radius: 50%;
		border: 1px /*solid*/ black;
		margin: 0 3px;
		margin-top: 8PX;
		}

.pq .pqz{float: right;
		color: #7f7f7f;
		line-height: 14px;
	    font-size: 13px;
	    /*margin-top: 13PX;*/
		}
.er_er{float: right;
		color: #333;
		line-height: 18px;
	    font-size: 16px;
	    margin-top: 6px;
}
.j_f{float: right;
		color: #333;
		line-height: 17px;
	    font-size: 12px;
	    margin-top: 6px;
		
}	
.you_fei{float: right;
		color: #333;
		line-height: 17px;
	    font-size: 12px;
		margin-top: 6px;
}	
.wenzi{margin-left: 5px;
		float: left;
		box-sizing: border-box;
		border: /*solid*/ yellow 1px;
		display: inline-block;
		
		}
.di{margin: 0;
			box-sizing: border-box;
			border: /*solid*/ 1PX slateblue;
			padding: 0 15px;
			}
.hyzl{float: right;
		background: #9b9b9b;
		height: 12px;
		width: 12px;
		margin-top: 5px;
		}
.ds_pqgz{margin-top: 6px;
			font-size: 12px;
			color: #333;
			float: right;
			line-height: 17px;
			}

.clearfix{float: none;
	clear: both;
	}

.tu1_box1{
	border: 1px solid red;
	border-bottom: 1px solid red;
	border: 1px /*solid*/ black;
	padding: 12px 0px;
	background: white;
	
}			
.tupian1{
	height: 60px;
	width: 60px;
	float: left;
	/*background: url(../assets/img/Rectangle 26.png) no-repeat center;*/
}
.tupian1 img{
	height: 60px;
	width: 60px;
}	
.ji_fenk1{
	border-bottom: 1px solid #EEEEEE;
	padding: 10px 10px;
	border: 1px /*solid*/ red;
	padding: 0 15px;
	background: white;
}
.jifenshangcheng{
	float: left;
	line-height: 20px;
	font-size: 14px;
	margin-left: 10px;
	margin-top: 10px
}
.yifahuo{
	float: right;
	line-height: 20px;
	font-size: 14px;
	color: #FF2E22;
	margin-top: 10px;
	margin-right: -7px;
	
	
	
}
.ji_fenk1 .tu2_tu22{
	width: 24px;
	height: 24px;
	border: 1px /*solid*/ red;
	float: left;
	background-size: 24px;
	margin-top: 8px;
	margin-left: -12px;
	padding: 0 20px;
	
}
.tu1_tu11{
	border: 1px /*solid*/ red;
	margin-top: 0px;
	padding: 0 15px;
}
.cheng_1{
	float: right;
	margin-top: 10px;
	line-height: 13px;
	font-size: 13PX;
	color: #4A4A4A;
}
.yu_fei{
	width: 100%;
	height: 44px;
	padding: 0 15px;
	border-top: 1px solid #EEEEEE;
	
}
.yun_fei{
	float: left;
	line-height: 20px;
	font-size: 14px;
	color: #333333;
	margin-top: 12px;
}
.ji_fen{
	float: right;
	line-height: 20px;
	font-size: 14px;
	color: #333333;
	margin-top: 12px;
}
.sanqi{
	float: right;
	line-height: 20px;
	font-size: 14px;
	color: red;
	margin-top: 12px;
}
.gongyi{
	float: right;
	line-height: 20px;
	font-size: 14px;
	color: #333333;
	margin-top: 12px;
}
.tuan_kuang{
		width: 180px;
		height: 100px;
		background:rgba(0,0,0,0.5);
		position: absolute;top:50%;
		left:50%;
		margin-left: -90px;
		margin-top: -50px;
		border-radius: 5px;
}
.fu_hao{
	height: 30px;
	width: 30px;
	margin: 0 auto;
	margin-top: 20px;
}
.fu_hao img{
	display: block;
	width: 100%;
}
.man_jifen{
	font-size: 13px;
	margin-top: 14px;
	text-align: center;
	color: #FFFFFF;
}
.jie_shu{
	float: right;
	font-size: 13px;
	color: #F8AF2C;
	margin-top: 9px;
}
.shishi{
	float: left;
	margin-left: 10px;
	line-height: 50px;
	font-size: 14px;
	color: #333333;
}
.y_i{
	float: left;
	
	line-height: 50px;
	font-size: 16px;
	color: #FF2E22;
}
.lu_kuang{
	height: 40px;
	width: 100%;
	background: #00c850;
	padding: 10px 15px;
}
.lu_kuangw{
	color: #FFFFFF;
	font-size: 16px;
	width: 49;
	height: 22px;
	line-height: 22px;
}
.di_san{
	height: 40px;
	width: 100%;
	border-bottom: 1px solid #EEEEEE;
	padding: 10px 10px;
	background: white;
}
.di_sanm{
	line-height: 20px;
	font-size: 14px;
	color: #333333;
	float: left;
}
.di_sanmm{
	line-height: 20px;
	font-size: 14px;
	color: #7F7F7F;
	float: right;
}
.liuliu{
	line-height: 20px;
	color: #333333;
	font-size: 14px;
}
.di_san1{
	height: 40px;
	width: 100%;
	border-bottom: 1px solid #EEEEEE;
	padding: 10px 8px;
	background: white;
}
.meiren{
	width: 100%;
	height: 60px;
	background: white;
	border-bottom: 1px solid #EEEEEE;
	padding: 18px 15px;
	color: #333333;
	font-size: 14px;
}
.meiren img{
	float: left;
	width: 36px;
	height: 36px;
	margin-top: -5px;
	margin-right: 10px;
}
.meiren1{
	line-height: 20px;
	float: left;
	font-size: 14px;
	margin-left: 10px;
}
.meiren2{
	float: right;
	line-height: 20px;
	font-size: 13px;
	color: #9B9B9B;
}
</style>
